package Homework;

import java.util.Scanner;

public class HomeWork03 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);



        int a =9,b = 9,c,year,year2,month;
        System.out.println(a % b);

        System.out.println(a++);
        System.out.println(++b);

        System.out.println("a的值" + a + " b的值" +b);
        c = a++ - 1;
        System.out.println("c的值" + c +" a的值"+a);

        boolean b1,b2,b3,b4;
        b1 = a == b;
        b2 = a != b;
        b3 = a >= b;
        b4 = c <= b;
        System.out.println("b1到b4分别为:" + b1 + ","+ b2 + ","+ b3 + ","+ b4 );

        b1 = a == b && c <=b;

        System.out.println("b1到b4分别为:" + b1 + ","+ b2 + ","+ b3 + ","+ b4 );

        System.out.println("请输入year的值:");
        year =sc.nextInt();
        if(year%4 == 0 && year%100 != 0){
            System.out.println("year" + year +"为闰年");
        }else{
            System.out.println("year" + year + "为平年");
        }


        System.out.println("请输入年:");
        year2 = sc.nextInt();
        System.out.println("请输入月:");
        month = sc.nextInt();
        switch (month) {
            case 1:
            case 3:
            case 5:
            case 7:
            case 9:
            case 11:
                System.out.println("天数为31");
                break;

            case 4:
            case 6:
            case 8:
            case 10:
            case 12:
                System.out.println("天数为30");
                break;
            case 2:
                if(year2 % 4==0 && year2 % 100 != 0){
                    System.out.println("28");
                }else {
                    System.out.println("29");
                }
                break;
            default:
                System.out.println("错误");
        }











    }

}
